﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Soft.Service
{

    /// <summary>
    /// 获取系统负载的使用情况
    /// </summary>
    public sealed class GetSystemLoadControlProcessor : BaseRemoteControlProcessor
    {


        /// <summary>
        /// 获取系统负载
        /// </summary>
        /// <param name="jsonParam"></param>
        /// <returns></returns>
        public override ResultJson Processing(string jsonParam)
        {
            GetSystemLoadResult obj = new GetSystemLoadResult
            {
                SystemLoad = HardwareInformation.GetSystemLoad()
            };
            return new ResultJson
            {
                Json = JsonConvertHelper.ToJson(obj)
            };
        }


    }
}
